import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login',
            hidden: true,
            component: () => import('@/view/Login.vue')
        },
        {
            path: '/login',
            name: 'Login',
            hidden: true,
            component: () => import('@/view/Login.vue')
        },
        {
            path: '/home',
            name: 'Home',
            hidden: false,
            component: () => import('@/view/Home.vue'),
            children: [
                {
                    path: '/home/client',
                    name: '客户端',
                    iconClass: 'fa fa-desktop fa-lg',
                    component: () => import('@/view/Client.vue')
                },
                {
                    path: '/home/tcp',
                    name: 'TCP隧道',
                    iconClass: 'fa fa-retweet fa-lg',
                    component: () => import('@/view/PortMap.vue')
                },
            ]
        }
    ],
    mode: 'history'
})
